<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>

<script>
    //自定义属性
    var obj = {};
    obj.age = 18;
    Object.defineProperty(obj,"name",{
        value:"哈哈哈",
        configurable:false,  //是否能被delete 删除
        writable:false,        //是否可以被覆盖写
        enumerable:false,       //是否可以枚举
    })
    // for (k in obj){
    //     console.log(k);
    // }
    //
    console.log(obj);

    obj.name = "lisi";
    delete obj.age;
    delete obj.name;
    console.log(obj);
</script>